package com.xyf.sys.mapper;

import com.xyf.sys.domain.UserAddress;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface UserAddressMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserAddress record);

    int insertSelective(UserAddress record);

    UserAddress selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(UserAddress record);

    int updateByPrimaryKey(UserAddress record);

    List<UserAddress> selectUserAddressList(@Param("userId") String userId,
                                            @Param("type") Integer type,
                                            @Param("regimentRole") Boolean regimentRole,
                                            @Param("keyword") String keyword,
                                            @Param("deptId") Long deptId,
                                            @Param("status") String status);

    UserAddress selectUserDefaultAddress(@Param("userId") String userId, @Param("type") Integer type);

    List<UserAddress> selectListByMobile(@Param("mobile") String mobile);

    UserAddress selectByMobile(@Param("name") String name , @Param("mobile") String mobile);

    List<UserAddress> selectAll();
}